﻿namespace ClientDomain
{
    public static class ClientEvents
    {
        public delegate void ErrorUploadingFiles(string error);
        public static event  ErrorUploadingFiles OnErroUploadingFiles;

        public delegate void ErrorDownloadingFiles(string error);
        public static event ErrorDownloadingFiles OnErroDownloadingFiles;

        public delegate void FileUploadedSuccessfully();
        public static event FileUploadedSuccessfully OnFileUploadedSuccessfully;

        public delegate void FileDownloadedSuccessfully();
        public static event FileDownloadedSuccessfully OnFileDownloadedSuccessfully;

        public static void RaiseErrorUploadingFile(string error)
        {
            if (OnErroUploadingFiles!=null)
                OnErroUploadingFiles(error);
        }

        public static void RaiseErrorDownloadingFile(string error)
        {
            if (OnErroDownloadingFiles != null)
                OnErroDownloadingFiles(error);
        }

        public static void RaiseFileUploadedSuccessfully()
        {
            if (OnFileUploadedSuccessfully != null)
                OnFileUploadedSuccessfully();
        }

        public static void RaiseFileDownloadedSuccessfully()
        {
            if (OnFileDownloadedSuccessfully != null)
                OnFileDownloadedSuccessfully();
        }

    }
}
